﻿using System;
using System.IO;
using System.Text;
using System.Collections.Generic;

class ExtractXML
{
    static void Main()
    {
        using (StreamReader reader = new StreamReader("test.txt"))
        {
            int prevChar = ' ';
            List<string> info = new List<string>();
            StringBuilder temp = new StringBuilder();

            for (int ch; (ch = reader.Read()) != -1; )
            {
                if (prevChar == '>' && ch != '<')
                {
                    while (ch != '<' && ch != -1)
                    {
                        if (ch != ' ' && ch != '\n' && ch != '\r' && ch != '\t') temp.Append((char)ch);
                        ch = reader.Read();
                    }

                    if (temp.Length > 0)
                    {
                        info.Add(temp.ToString());
                        temp.Clear();
                    }
                }
                prevChar = ch;
            }

            foreach (string item in info)
            {
                Console.WriteLine(item);
            }
        }
    }
}